1. Field of the Invention
The present invention relates to an optical recording medium and more particularly to a method and device for searching a first available good spare block from an optical recording medium.
2. Background of the Related Art
An optical storage medium is generally divided into a read only memory (ROM), a write once read many (WORM) memory into which data can be written one time, and rewritable memories into which data can be written several times. Rewritable optical storage mediums, i.e. optical discs, include rewritable compact discs (CDxe2x88x92RW) and rewritable digital versatile discs (DVDxe2x88x92RW, DVDxe2x88x92RAM, DVD+RW).
A repeated recording/playback (R/P) of information to/from rewritable optical disks causes a change in the initial mix ratio of a recording layer formed to record the information on the optical disk. This change degrades the performance of the optical disk, causing errors in the recording/reproduction of information. Namely, the errors due to such degradation show up as defective areas during formatting, recording to and playback from the optical disk. Defective areas of a rewritable optical disk may also be caused by a scratch on its surface, particles of dirt and dust, or errors during manufacture. Therefore, in order to prevent writing into or reading out of a defective area, management of defective areas is necessary.
FIG. 1 shows a defect management area (DMA) in a lead-in area and a lead-out area of a related art optical disc to manage a defect area. Particularly, the data area is divided into a plurality of zones for the defect area management, where each zone is further divided into a user area and a spare area. The user area is where data is actually written and the spare area is used when a defect occurs in the user area.
There are generally four DMAs in one disc, e.g. DVDxe2x88x92RAM, two of which exist in the lead-in area and two exist in the lead-out area. Because managing defective areas is important, the same contents are repeatedly recorded in all four DMAs to protect the data. Each DMA comprises two blocks of 32 sectors, where one block comprises 16 sectors. The first block of the DMA, called a DDS/PDL block, includes a disc definition structure (DDS) and a primary defect list (PDL). The second block of the DMA, called an SDL block, includes a secondary defect list (SDL). The PDL corresponds to a primary defect data storage and the SDL corresponds to a secondary defect data storage.
The PDL generally stores entries of defective sectors caused during the manufacture of the disc or identified when formatting a disc, namely. initializing and re-initializing a disc. Each entry is composed of an entry type and a sector number corresponding to a defective sector. The SDL lists defective areas in block units, thereby storing entries of defective blocks occurring after formatting or defective blocks which could not be stored in the PDL during the formatting. As shown in FIG. 2, each SDL entry has an area for storing a sector number of the first sector of a block having defective sectors, an area for storing a sector number of the first sector of a block replacing the defective block, and reserved areas.
Also, each SDL entry is assigned a value of 1 bit for forced reassignment marking (FRM). A FRM bit value of 0 indicates that a replacement block is assigned and that the assigned block does not have a defect. A FRM bit value of 1 indicates that a replacement block has not been assigned or that the assigned replacement block has a defect. Thus, to record data in a defective block listed as a SDL entry, a new replacement block must be found to record the data. Accordingly, defective areas, i.e. defective sectors or defective blocks, within the data area are replaced with normal or non-defective sectors or blocks by a slipping replacement algorithm and a linear replacement algorithm.
The slipping replacement is utilized when a defective area or sector is recorded in the PDL. As shown in FIG. 3A, if defective sectors m and n, corresponding to sectors in the user area, are recorded in the PDL, such defective sectors are skipped to the next available sector. By replacing the defective sectors by subsequent sectors, data is written to a normal sector. As a result, the user area into which data is written slips and occupies the spare area in the amount equivalent to the skipped defective sectors.
The linear replacement is utilized when a defective block is recorded in the SDL or when a defective block is found during playback. As shown in FIG. 3B, if defective blocks m and n, corresponding to blocks in either the user or spare area, are recorded on the SDL, such defective blocks are replaced by normal blocks in the spare area and the data to be recorded in the defective block are recorded, in an assigned spare area. To achieve the replacement, a physical sector number (PSN) assigned to a defective block remains; while a logical sector number (LSN) is moved to the replacement block along with the data to be recorded. Linear replacement is effective for non real-time processing of data.
If a replacement block listed in the SDL is found to be defective, a direct pointer method is applied to the SDL listing. According to the direct pointer method, the defective replacement block is replaced with a new replacement block and the SDL entry of the defective replacement block is modified into a sector number of the first sector of the new replacement block.
FIG. 4A shows a procedure to manage a defective block found while writing or reading data into or from the user area. FIGS. 4Bxcx9c4D show embodiments of SDL entries generated according to a related art linear replacement algorithm. Each SDL entry has, in order, a FRM, a sector number of the first sector of the defective block, and a sector number of the first sector of the replacement block.
For example, if the SDL entry is (1, blkA, 0) as shown in FIG. 4B, a defective block has been newly found during the reproduction and is listed in the SDL. This entry indicates that a defect occurs in block blkA and that there is no previously assigned replacement block. The SDL entry is used to prevent data from being written into the defective block in the next recording. Thus, during the next recording, the defective block blka is assigned a replacement block according to the linear replacement.
An SDL entry of (0, blkB, blkE), shown in FIG. 4C; indicates that the assigned replacement block blkE has no defect and data to be written into the defective block blkB in the user area is written into the replacement block blkE in the spare area. An SDL entry of (1, blkC, blkF) shown in FIG. 4D, indicates that a defect occurs in the replacement block blkF of the spare area which replaced the defective block blkC of the user area. In such case, a new replacement block is assigned according to the direct pointer method. If the new replacement block by the direct pointer method is block blkG, the resulting SDL entry would be (0, blkC, blkG) as shown in FIG. 4E.
FIG. 5 is a partial diagram of a related art optical disc recording/playback apparatus relating to the recording operation. The optical disc R/P apparatus includes an optical pickup to write data into and playback data from the optical disc; a servo unit controlling the optical pickup to maintain a certain distance between an object lens of the optical pickup and the optical disc, and to maintain a constant track; a data processor either processing and transferring the input. data to the optical pickup, or receiving and processing the data reproduced through the optical pickup; an interface transmitting and receiving data to and from an external host; and a micro processor controlling these components. The interface of the optical disc R/P apparatus is coupled to a host such as a PC, and communicates commands and data with the host.
If there is data to be recorded in an optical disc R/P apparatus, the host sends a recording command to the optical disc R/P. apparatus. The recording command comprises a logical block address (LBA) designating a recording location and a transfer length indicating a size of the data. Subsequently, the host sends the data to be recorded to the optical disc R/P apparatus. Once the data to be written onto an optical disc is received, the optical disc R/P apparatus writes the data starting from the designated LBA. At this time, the optical disc R/P apparatus does not write the data into areas having defects by referring to the PDL and SDL which indicate defective areas of the optical disc.
Referring back to FIG. 4A, the optical disc R/P apparatus skips physical sectors listed in the PDL and replaces the physical blocks listed in the SDL, within the area between A and B, with assigned replacement blocks in the spare area during the recording. If a defective block not listed in the SDL or a block prone to an error is found during the recording or playback, the optical disc R/P apparatus considers such blocks as defective blocks. As a result, the optical disc R/P apparatus searches for a replacement block in the spare area to rewrite the data corresponding to the defective block and lists the first sector""s number of the defective block and the first sector""s number of the replacement block at the SDL entry.
Therefore, playing an important role in the defective area management, the spare area may be allocated in each zone or group of the data area as in FIG. 1 or may be allocated in a designated portion of the data area. FIG. 6 shows one allocation method in which the spare area is placed at the top of the data area. In such case, the spare area is called a Primary Spare Area (SA-pri). Namely, the data area excluding the primary spare area becomes the user area.
Also, if defective sectors are discovered and registered during the initial or re-formatting, the recording capacity would be proportionately reduced since data cannot be recorded on defective sectors. Therefore, to maintain the initial data recording capacity, a portion of the primary spare area, equivalent to the defective sectors registered on the PDL, slips into the user area. The PSN of the user area to which a value of LSN=0 is assigned varies depending upon the defective sectors registered on the PDL.
Typically, the primary spare area is slipped into the user area in a reverse order as well as the assignment of replacement blocks to the primary spare area in the linear replacement. If the primary spare area becomes full by the slipping or linear replacement, as shown in FIG. 7A, a new spare area may be allocated near the end of the user area. Such new spare area is called a supplementary spare area (SA-sup). If the supplementary spare area becomes full, the allocation of the supplementary spare area may be enlarged as shown in FIG. 7B. The spare blocks in the supplementary spare area is also used in a reverse order during the linear replacement such that the supplementary spare area can be easily enlarged as necessary.
Thus, when a new defective block is found during the recording/playback, or defective blocks which cannot be registered on the PDL is present during the formatting, good blocks which can replace the defective blocks must be located from the allocated spare area. FIG. 8 illustrates an example of a related art process to replace defective blocks during recording/playback when a spare area is allocated in a zone as shown in FIG. 1.
Referring to FIG. 8, a determination is first made whether entries are listed on the SDL (501). If there is no entry listed on the SDL, the block next to the last data block of the user area within the group is determined as the first available good spare block of the group (502). If there are at least one entry listed in the SDL, a search is made in the replacement block storage positions for a block having the highest address value (503) and the block next to the block with the highest address value is determined as the first available good spareblock (504).
For example, if the entries listed on the SDL are as shown in FIGS. 4B, 4C and 4E for an optical disk shown in FIG. 4A, the block having the highest address value recorded in the replacement block storage position would be blkG. Thus, the first available good spare block would be the block next to the last replacement block blkG, i.e., blkH. Ifa block does not exist next to the last replacement block in the group in question, i.e., there is no more spare blocks left in the group, the foregoing process is repeated for another group.
However, the related art method for searching an available spare block may cause a problem when there are SDL entries, such as (1, blkA, 0) shown in FIG. 9B, without an assigned replacement block because a replacement block has not been assigned for a defective block shown in FIG. 9A. Particularly, a block with the highest address would also be searched since there is at least one entry listed on the SDL. In this case, a sector number of the first sector of the replacement block would be 000000h because only the defective block is listed in the SDL without a replacement block.
Accordingly, a block next to the block with an address value of xe2x80x980xe2x80x99 would be determined as the first available good spare block. Similarly, if the primary spare area is positioned at the top of the data area as shown in FIG. 6, the linear replacement is performed in a reverse order and a block prior to the block with an address value of xe2x80x980xe2x80x99 would be determined as the first available good spare block when there is a SDL entry without a replacement block. However, the data area starts from the sector 31000h and the first available good spare block would be at a wrong position, neither in the user area nor in the spare area. Thus, a replacement block for a defective block would not be assigned correctly and data would be recorded at a wrong position, if at all, causing errors during playback.
Accordingly, an object of the present invention is to solve at least the problems and disadvantages of the related art.
An object of the present invention is to effectively search for a first available good spare block from an optical recording medium. Thus, an object of the present invention is to accurately locate the first available good spare block when a SDL entry does not have assigned replacement blocks.
Another object of the present invention is to determine a first used block in the spare area as the first available good spare block when a SDL entry does not have assigned replacement blocks.
Additional advantages, objects, and features ofthe invention wilI be set forth in part in the description which follows and in part will become apparent to those having ordinary skill in the art upon examination of the following or may be learned from practice of the invention. The objects and advantages of the invention may be realized and attained as particularly pointed out in the appended claims.
To achieve the objects and in accordance with the purposes of the invention, as embodied and broadly described herein, a method of searching for a first available good spare block in an optical recording medium having a SDL according to the present invention includes (1) determining a presence of an assigned replacement block entry when there is at least one SDL entry; and (2) determining a first good block of the spare area as the available good spare block if there are no assigned replacement block entries in the step (1).
Step (2) includes determining a good block next to the last data block of a user area as the first available good spare block when the spare area follows the user area. Moreover, step (2) includes determining a good block in the spare area immediately prior to the first data block of the user area as the first available good spare block when the user area follows the spare area.
A device for searching a first available good spare block from an optical recording medium having an SDL according to the present invention, includes a determinator determining a presence of an assigned replacement block entry when there is at least one SDL entry; and a replacement block determinator determining a first good block of a spare area as the available good spare block if there are no assigned replacement block entries.